]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
BluetoothStatus: depend more on libgnome-bluetooth-applet
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 24 Jan 2011 17:39:45 +0000 (18:39 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 6 Feb 2011 11:11:04 +0000 (12:11 +0100)
Ensure that a dependency is generated even when using --as-needed,
by adding a fake function that calls into the library.

https://bugzilla.gnome.org/show_bug.cgi?id=639324

src/gnome-shell-plugin.c

index 96075f41fca02a5fe4c06f2dde97ee99964cbd23..8d85fa237ef2570becc48c4617cda58cc9d0cf38 100644 (file)
@@ -670,3 +670,17 @@ MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin)
 
   return &info;
 }
+
+#if HAVE_BLUETOOTH
+/* HACK:
+   Add a non-static function that calls into libgnome-bluetooth-applet.so,
+   to avoid the linker being too smart and removing the dependency.
+   This function is never actually called.
+*/
+extern GType bluetooth_applet_get_type(void);
+void _shell_link_to_bluetooth(void);
+
+void _shell_link_to_bluetooth(void) {
+  bluetooth_applet_get_type();
+}
+#endif